//
//  DENFavorableModel.m
//  Icar
//
//  Created by apple on 15/10/16.
//  Copyright © 2015年 小龙侠. All rights reserved.
//

#import "DENFavorableModel.h"

@implementation DENFavorableModel
- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [aCoder encodeObject:self.modelName forKey:@"modelName"];
    [aCoder encodeObject:self.dealerType forKey:@"dealerType"];
    [aCoder encodeObject:self.discount forKey:@"discount"];
    [aCoder encodeObject:self.price forKey:@"price"];
    [aCoder encodeObject:self.modelId forKey:@"modelId"];
    [aCoder encodeObject:self.namelistRange forKey:@"namelistRange"];
    [aCoder encodeObject:self.dealerName forKey:@"dealerName"];
    [aCoder encodeObject:self.modelType forKey:@"modelType"];
    [aCoder encodeObject:self.phone forKey:@"phone"];
    [aCoder encodeObject:self.serialGroupId forKey:@"serialGroupId"];
    [aCoder encodeObject:self.image forKey:@"image"];
    [aCoder encodeObject:self.dealerId forKey:@"dealerId"];
    [aCoder encodeObject:self.area forKey:@"area"];
}

#pragma mark - 解码读取

- (id)initWithCoder:(NSCoder *)aDecoder{
    self = [super init];
    if (self) {
        self.modelName = [aDecoder decodeObjectForKey:@"modelName"];
        self.dealerType = [aDecoder decodeObjectForKey:@"dealerType"];
        self.discount = [aDecoder decodeObjectForKey:@"discount"];
        self.price = [aDecoder decodeObjectForKey:@"price"];
        self.modelId = [aDecoder decodeObjectForKey:@"modelId"];
        self.namelistRange = [aDecoder decodeObjectForKey:@"namelistRange"];
        self.dealerName = [aDecoder decodeObjectForKey:@"dealerName"];
        self.modelType = [aDecoder decodeObjectForKey:@"modelType"];
        self.phone = [aDecoder decodeObjectForKey:@"phone"];
        self.serialGroupId = [aDecoder decodeObjectForKey:@"serialGroupId"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
        self.dealerId = [aDecoder decodeObjectForKey:@"dealerId"];
        self.area = [aDecoder decodeObjectForKey:@"area"];
        
    }
    return self;
}

@end
